<div id="product-sell-most">	
	<div class="bg_home text2 fs16 plm">SẢN PHẨM BÁN CHẠY</div>
	<?php foreach ($products as $product): ?>
		<div class="product">
			<div class="image">
				<?php 
					$cat_id = $product->category->parent->id==1?$product->category->parent->id:1;
				?>
				<?php echo CHtml::link(
							CHtml::image($product->newest_image->thumb230x150, $product->title),
							array('/product/product/viewProduct',  'id'=>$cat_id,'product_id'=>$product->id)
					); 
				?>
			</div>
			<div class="title fs14 fsi alc mbs">
				<?php echo CHtml::link($product->title, array('/product/product/viewProduct', 'id'=>$product->category->parent->id, 'product_id'=>$product->id)); ?>
			</div>
			<div class="price">
				<div class="bg_price alc fs15 text3">
					<?php echo Yii::app()->format->formatNumber($product->price); ?> VNĐ
				</div>
				<div>
					<?php echo CHtml::link(CHtml::image('images/icon/dathang.png'), array('/product/cart/add', 'product_id'=>$product->id)); ?>
				</div>
			</div>
		</div>
	<?php endforeach; ?>
</div>